Skip to content

build(server): update QueryKit to 1.17.1 and let a filter value start or end with a quote - #394

Merged
pdevito3 merged 1 commit into
mainfrom
build/querykit-1-17-1
Nov 1, 2026
Merged

pdevito3 merged 1 commit into
mainfrom
build/querykit-1-17-1

Conversation

@pdevito3

@pdevito3 pdevito3 commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Why

A user of the filter builder must be able to filter on any text, including text that starts or ends with a ". QueryKit 1.17.0 could not hold such a value, so #372 made the filter builder refuse it. QueryKit 1.17.1 (pdevito3/QueryKit#214) removes one space from each end of a raw string when the text starts and ends with a space and is not all spaces. A padded raw string now holds every value.

What changed

Tests

  • The converter unit tests give the padded literal for a quote inside, at each end, and for only quotes, in a text filter and in a multiselect.
  • The control tests prove that the text and multiselect controls add a value with a quote at an end.
  • WorkshopListQueryTests proves on Postgres that each padded literal finds only its own row. For example, title == """ "Paul" """ finds "Paul" and not Paul.
  • The e2e spec text-filter.spec.ts checks the QueryKit text in the filter demo.

Local runs: pnpm lint, pnpm build, pnpm test (513 tests), the filter demo e2e specs (230 passed), WorkshopListQueryTests (24), and QueryKitInputExtensionsTests (41).

Known gap

QueryKit removes all edge spaces from a quoted list item (pdevito3/QueryKit#216). So a multiselect option with a space at an end matches the trimmed text. No option in the template has such a value. This gap existed before this PR.

… or end with a quote

QueryKit 1.17.1 removes one space from each end of a raw string when the
text starts and ends with a space and is not all spaces. The filter
builder now pads each raw string with one space, so a quote at the start
or the end of a value stays part of the value.

The text and multiselect controls no longer refuse such a value, and the
badge no longer marks a preset with one as not used.
@pdevito3

pdevito3 commented Nov 1, 2026

Copy link
Copy Markdown
Owner Author

Independent verification of 173921f: PASS+NOTES

Goal: a user of the filter builder can filter on any text, including text that starts or ends with a ".

I ran the stack isolated from a fresh worktree at origin/build/querykit-1-17-1 (173921f) with the verify-fullstack-template skill. The doctor was all ok. The server deps.json names QueryKit/1.17.1. I drove Chromium through the real BFF with ZeroFactor login.

Filter demo (/filter-demo)

  • I added First Name / Contains with "Paul", then quote", then Say "hi" now. Each dialog showed no alert, the field had no aria-invalid, and Add Filter added the filter.
  • QueryKit text: firstName @=* """ "Paul" """ && firstName @=* """ quote" """ && firstName @=* """ Say "hi" now """.
  • Badges have no fault marks. No badge element has the text-destructive or border-destructive class. All three borders compute to the same color as a plain border element. The page has no role=alert and no "not used" text.
  • Alignment was measured with bounding boxes. The center of each AND is within 1.5 px of the center of its badge. In grouping mode, the center of each checkbox is within 1.5 px of the center of its badge (433 px and 433 px).
  • The edit dialog of the "Paul" badge opens with the value "Paul" and no alert. Update keeps the padded string.
  • Grouping two quote filters gives firstName @=* """ Say "hi" now """ && (firstName @=* """ "Paul" """ && firstName @=* """ quote" """). Switch to OR gives ||.
  • Multiselect: Status with Open and In Progress still adds status ^^ ["open", "in-progress"] and shows no alert.
  • sweep.sh on recipes/examples/filter-builder.mjs passed, with the web font and without it.

Server through the BFF

I started a tenant and added a venue in the UI. I added the workshop "Paul" in the New workshop form, and Paul, quote", and Say "hi" now with POST /api/v1/workshops. Then I sent GET /api/v1/workshops?filters=... from the logged-in page:

filters status titles returned
title == """ "Paul" """ 200 "Paul"
title == "Paul" 200 Paul
title == """ quote" """ 200 quote"
title == """ Say "hi" now """ 200 Say "hi" now
title @=* """ "Paul" """ (demo output, key swapped) 200 "Paul"
title @=* """ quote" """ (demo output, key swapped) 200 quote"
title @=* """ Say "hi" now """ (demo output, key swapped) 200 Say "hi" now
title @=* "Paul" 200 "Paul", Paul
title ^^ [""" "Paul" """, """ quote" """] 200 "Paul", quote"
title ^^ ["Paul"] 200 Paul

Each padded filter returns only its own row. The recipe run passed with no page errors. The only console or network error was the documented 404 of GET /api/v1/users/by-identifier/{sub} for a new user. The data restore passed.

Notes

  1. The demo has no multiselect option with a quote at an end, so I could not drive that case in the UI. The server side of the case passes: the padded in-list form (^^ [""" "Paul" """, ...]) returns the right rows.
  2. Harness gap, not caused by this PR: settle() does not wait for the Motion draw-in of the checkbox checkmark. So a capture() right after a checkbox click shows a filled box with no checkmark. A probe showed that the path ends at opacity: 1 with no dash array, and that the checkmark then draws correctly.
  3. The known gap A quoted list item loses the spaces at its ends QueryKit#216 (edge spaces of a quoted list item) was not tested, because no template option has such a value.

Evidence (local): /Users/paul/repos/FullstackTemplate-worktrees/verify-394-evidence/ holds pr394-2/ (screenshots 01-dialog-quote-value.png, 02-three-quote-filters.png, 03-edit-quote-badge.png, 04-grouping-selection.png, 05-grouped.png, 06-grouped-or.png, trace.zip, steps.log), cbprobe-2/01-probe.png, the sweep runs, and the recipe recipes/pr394.mjs.

@pdevito3
pdevito3 merged commit 618b5d4 into main Nov 1, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant